plugins {
    id 'application'
    id 'org.openjfx.javafxplugin' version "${javafxpluginVersion}"
    id 'org.beryx.jlink' version '3.0.1'
}

javafx {
    version = "21.0.2"
    modules = [ 'javafx.controls', 'javafx.fxml', 'javafx.graphics']
}

dependencies {
    implementation project(":protocol")
    implementation project(":torrent-lib")
    implementation "org.controlsfx:controlsfx:${controlsfxVersion}"
    implementation "com.google.inject:guice:${guiceVersion}"
    implementation "org.apache.commons:commons-collections4:${commonsCollectionsVersion}"
    implementation "com.google.guava:guava:${guavaVersion}"
    implementation "org.slf4j:slf4j-simple:${slf4jVersion}"
}

jlink {
    launcher {
        name = 'transmissionFx'
        mainClass = 'ru.lukyanets.transmission.client.Main'
        noConsole = true
        forceMerge 'slf4j'
    }

    jpackage {
        installerName = 'TransmissionFx'
        installerType = 'msi'
        icon = 'src/main/resources/img/icon/icon.ico'
    }
}

run {
    mainClassName = 'ru.lukyanets.transmission.client.Main'
}
